<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        html,body{
            height: 100%;
        }
        body{
            margin: 0;
            padding: 0;
            overflow: hidden;
        }
        main{
            width: 100%;
            height: 100%;
            background-image: url(bg.png);
            background-repeat:no-repeat;
            background-size: 100% 100%; 
        }
        ul{
            position: relative;
            top: 20px;
            width: 800px;
            margin: 0 auto;
        }
        li{
            list-style: none;
            margin-top:30px;
            border-radius:10px; 
            height: 30px;
            position: relative; 
            text-align: center;

        }
        li:nth-child(2n+1){
            background-color: lightblue;
            width: 800px
        }
        li:nth-child(2n){
            background-color:thistle;
            
            width: 500px
        }
        
    </style>
</head>
<body>
    <main>
        <ul>
            <li><a href="作业/index.html">千图网</a></li>
            <li><a href="01 - 鼠标放上去显示遮罩层/显示遮罩层.html">鼠标放上去显示遮罩层</a></li>
            <li><a href="02 - 轮播图/jq复杂轮播图.html">JQ索引按钮轮播图</a></li>
            <li><a href="01 - 订单/订单.html">订单</a></li>
            <li><a href="02 - 选项卡/JQ选项卡.html">选项卡</a></li>
            <li><a href="03 - 下拉菜单/下拉菜单.html">下拉菜单</a></li>
            <li><a href="04 - 模拟select/index.html">模拟</a></li>
            <li><a href="04 - 星星评分、图片上传/jq版星星评分.html">jQ星级评分</a></li>
            <li><a href="04 - 星星评分、图片上传/点击加号上传.html">点击加好上传</a></li>
            <li><a href="01 - 图片切换/图片切换.html">图片切换</a></li>
            <li><a href="03 - 置顶效果/置顶效果.html">指定效果</a></li>
            <li><a href="0221作业/商品筛选.html">商品筛选</a></li>
            <li><a href="0221作业/输入框.html">输入框</a></li>
            <li><a href="小米商城考试/index.html">小米商城</a></li>

        </ul>
    </main>
</body>
</html>
<script>
    var li=document.querySelectorAll('li')
    for(var i=0;i<li.length;i++){
        li[i].index=i
        if(li[i].index==3 || 7||11||15||19||23){
            li[3].style.left='300px'
            li[7].style.left='300px'
            li[11].style.left='300px'
            li[15].style.left='300px'
            li[19].style.left='300px'
            li[23].style.left='300px'
        }
        li[this.index].style.backgroundColor='#000'
        li[this.index].style.color='wheat'
        
    }
</script>